unistd: raise SIGPIPE signal on write() EPIPE error#124
Conversation
|
@nalajcie if we add such wrapper for send, sendto and sendmsg will this be ok? It's a simple solution and fits nicely in our architecture, question is - is it enough? |
|
I've found some more insights: Seems that on MacOS / BSD there is a socket option ( On a side note - it's written in the link provided that POSIX-2004 requires us to send signal to the correct thread (not process) which is something we should take into the consideration in the future. |
|
@nalajcie About sending signal to the right thread - our |
Oh, that's great! I don't know how advanced our signal implementation is, do we support per-thread signal masking also ( |

DO NOT MERGE THIS YET, IT'S JUST A PROPOSED SOLUTION
EPIPEandSIGPIPEinwrite()as described by OpenGroup:Things to consider/change:
write()EPIPEerror generateSIGPIPEsignal?No. As mentioned above writing to shut down
SOCK_DGRAM(UDP) socket should returnEPIPEerror withoutSIGPIPEsignal.SIGPIPEbe sent to the writing thread or process (all process threads)?As mentioned above
SIGPIPEshould be sent to the writing thread only.Description
Changed
write()to raiseSIGPIPEsignal onEPIPEerror.Motivation and Context
Fixes phoenix-rtos/phoenix-rtos-project#166
JIRA: RTOS-84
Types of changes
How Has This Been Tested?
Checklist:
Special treatment